<?php
namespace Home\Controller;
use Think\Controller;

class IndexController extends Controller {
    public function index(){
        $this->assign('isPC', json_encode(isPC()));

        $res = D('one')->getRandom();
        $this->assign('page', json_encode($res['page']));
        $this->assign('imgauthor', json_encode($res['imgauthor']));
        $this->assign('words', json_encode($res['words']));

        $this->show(render($this->fetch()));

    }
}
?>